import React from 'react'
import { View, Text, Image } from 'react-native'
import { Colors, Metrics, Fonts, } from '../Themes'
import { WINDOW } from '../Services'
import LdImage from './LdImage'
import Video from 'react-native-video'
import moment from 'moment'
import 'moment/locale/zh-cn'
moment.locale('zh-cn')
export default function ProductCell(props) {
    let filePath = props.imgPath;
    return (
        <View style={{ flexDirection: 'row', alignItems: 'center', backgroundColor: 'white', padding: 15 }}>
            <LdImage
                style={{ width: 110, height: 80 }}
                url={filePath}
            />
            <View style={{ flex: 1 }}>
                <View style={{ flex: 1, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
                    <Text style={{ fontSize: 14, color: '#333333', marginLeft: 8 }}>{props.title}</Text>
                </View>
                <Text style={{ fontSize: 11, color: '#999999', marginLeft: 8 }} numberOfLines={1}>评论{props.clickNum}</Text>
                <View style={{ flexDirection: 'row', alignItems: 'center', flex: 1, marginHorizontal: 8, justifyContent: 'space-between' }}>
                    <Text style={{ fontSize: 10, color: '#666666' }}>{moment(props.createTime).fromNow()}</Text>
                </View>
            </View>
        </View>
    )
}                                                     